/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Negocio;

import Datos.LoginDB;
import java.sql.SQLException;
import java.util.ArrayList;

/**
 *
 * @author Jorge
 */
public class Lista_login {
    private ArrayList login = new ArrayList();
        
    public void listar() {
        try {
            LoginDB loginDB = new LoginDB();
            setLogin(loginDB.listar());
        } catch (SQLException ex) {
          //  Logger.getLogger(Lista_clientes.class.getName()).log(Level.SEVERE, null, ex);
        }
    }


    public ArrayList getLogin() {
        return login;
    }


    public void setLogin(ArrayList login) {
        this.login = login;
    }
    
    public int getId(){
       listar();
       Login log = (Login)login.get(login.size()-1);
       return log.getId();        
    }
}
